summerready = function() {
	notApprInfo.init();
	notApprInfo.bindEvent();
	notApprInfo.initlist();
}
var notApprInfo = {
	init : function() {
		$service.callAction({
			"viewid" : "com.yonyou.SilverskinApplyController", //部署在MA上的Controller的包名
			"action" : "initSilverskin", //后台Controller的方法名,
			"params" : {
				a : 1,
				b : 2
			}, //自定义参数，json格式
			"callback" : "callBack()", //请求成功后回调js方法
			"error" : "errCallBack()"//请求失败回调的js方法
		})
	},
	bindEvent : function() {
		//返回按钮
		$(".sk_back").click(function(){
			summer.closeWin();
		});
		//刷新按钮
		$(".sk_refresh").click(function(){
			notApprove.init();
		});
	},
	initlist : function(data) {
		var logininfo = $cache.read("logininfo");
		var billinfo = data.billinfo;
		//表头批次号
		$("#sk_batch").val(data.batch);
		//鸡场名称
		$("#sk_hennery").val(logininfo.hennery_name);
		//申请时间
		$("#sk_batch").val(data.creationtime);
		//将列表至空
		$(".sk-list-item").html("");
		var html="";
		for (var i = 0; i < billinfo.length; i++) {
			html+='<a href="#"  class="um-list-item" pk_apply="'+billinfo[i].pk_apply+'"> <div class="um-list-item-media"></div>'
				+'	<div class="um-list-item-inner">'
				+'		<div class="um-list-item-body">'
				+'			<div class="um-row f14">'
				+'				<div class="um-xs-6">'
				+'					鸡舍：<span>'+billinfo[i].henhouse_name+'</span>'
				+'				</div>'
				+'				<div class="um-xs-6">'
				+'					数量：<input type="number" id="'+billinfo[i].pk_henhouse+'"  value="'+billinfo[i].apply_num+'" style="width: 30%"/>吨'
				+'				</div>'
				+'			</div>'
				+'		</div>'
				+'	</div> '
				+'	</a>'
		
		};
		$(".sk-list-item").html(html);
		//未确定显示哪个按钮
	}
};

function callBack(args) {
	notApprInfo.initlist(args.data);
};

function errCallBack(args) {
	$alert(args.err_msg)
};